package com.ews.onlineexchange.service.schedule;

import javax.ejb.Schedule;
import javax.ejb.Singleton;
import javax.ejb.Startup;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.inject.Inject;
import javax.inject.Named;

import com.ews.onlineexchange.service.assess.AssessRecordService;

@Singleton
@Startup
@TransactionAttribute(TransactionAttributeType.REQUIRED)
@Named
public class AssessRecordRollbackTimer {

	@Inject
	AssessRecordService assessRecordService; 
	
	@Schedule(dayOfMonth="1", hour="0", minute="15", second="0", info = "assessRecordAutoRollbackTimer", persistent = false)
	public void run() {
		assessRecordService.rollback();
	}
	
}
